package com.jt.listener;


import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Component
public class Producter {
    private static final String EXCHANGE_NAME = "exchange-direct.order";
    private static final String QUEUE_NAME = "queue_order";
    private static final String ROUTING_KEY = "order";

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public  void faSong() {
        rabbitTemplate.convertAndSend(EXCHANGE_NAME,ROUTING_KEY,"发送消息hello1111");
    }

}
